package controller;
import interfaces.IFSupplier;

import java.util.ArrayList;

import model.Customer;
import model.Supplier;
import db.CustomerDb;
import db.SupplierDb;
public class SupplierCtr implements IFSupplier {
	protected SupplierDb supplierDb = new SupplierDb();
	
	@Override
	public ArrayList<Supplier> getAllSuppliers() throws Exception {
		return supplierDb.getAllSuppliers();
	}

	@Override
	public Supplier searchSupplier(String name, String phoneNumber,
			String address, String email, int zipcode, String country,
			String city, int productId) throws Exception {
		return supplierDb.searchSupplier(name, phoneNumber, address, email, zipcode, country, city, productId);
	}

	@Override
	public ArrayList<Supplier> searchSupplierList(String name,
			String phoneNumber, String address, String email, int zipcode,
			String country, String city, int productId) throws Exception {
		return supplierDb.searchSupplierList(name, phoneNumber, address, email, zipcode, country, city, productId);
	}

	@Override
	public void insertSupplier(String name, String phoneNumber, String address,
			String email, int zipcode,String description,  int productId) throws Exception {
		supplierDb.insertSupplier(name, phoneNumber, address, email, zipcode, description, productId);
	}

	@Override
	public void removeSupplier(String name, String phoneNumber, String address, String country, String city,
			String email, int zipcode, int productId) throws Exception {
		supplierDb.removeSupplier(name, phoneNumber, address, country, city, email, zipcode, productId);
		
	}

}
